import {createRouter, createWebHashHistory} from "vue-router";
const routes = [
    {
        path: '/',
        name: 'Home',
        component: () => import('../views/web/Home.vue')
    },{
        path: '/article_details',
        name: 'ArticleDetails',
        component: () => import('../views/web/ArticleDetails.vue')
    },{
        path: '/classify',
        name: 'Classify',
        component: () => import('../views/web/Classify.vue')
    },{
        path: '/search',
        name: 'Search',
        component: () => import('../views/web/SearchCon.vue')
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('../views/admin/Login.vue')
    }, {
        path: '/admin',
        name: 'AdminHome',
        component: () => import('../views/admin/AdminHome.vue'),
        children: [
            {
                path: 'home',
                component: () => import('../views/admin/Home.vue')
            },
            {
                path: 'article_create',
                component: () => import('../views/admin/ArticleCreate.vue')
            },
            {
                path: 'article_storehouse',
                component: () => import('../views/admin/ArticleStorehouse.vue')
            },
            {
                path: 'project',
                component: () => import('../views/admin/Project.vue')
            },
            {
                path: 'system',
                component: () => import('../views/admin/System.vue')
            },
            {
                path: 'classification',
                component: () => import('../views/admin/Classification.vue')
            }
        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})
export default router